﻿
@{
    ViewData["Title"] = "注册";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<header class="mui-bar mui-bar-nav">
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
    <h1 class="mui-title">注册</h1>
</header>
<div class="mui-content">
    <div class="mui-input-group">
        <div class="mui-input-row">
            <label>账号</label>
            <input id='UserName' name="UserName" type="text" class="mui-input-clear mui-input" placeholder="请输入账号">
        </div>
        <div class="mui-input-row">
            <label>密码</label>
            <input id='UserPwd' name="UserPwd" type="password" class="mui-input-clear mui-input" placeholder="请输入密码">
        </div>
        <div class="mui-input-row">
            <label>确认</label>
            <input id='UserPwd_confirm' name="UserPwd_confirm" type="password" class="mui-input-clear mui-input" placeholder="请确认密码">
        </div>
        <div class="mui-input-row">
            <label>邮箱</label>
            <input id='Emaile' name="Emaile" type="email" class="mui-input-clear mui-input" placeholder="请输入邮箱">
        </div>
        <div class="mui-input-row">
            <label>手机号</label>
            <input id='Mobile' name="Mobile" type="text" class="mui-input-clear mui-input" placeholder="请输入手机号">
        </div>
    </div>
    <div class="mui-content-padded">
        <button id='reg' onclick="Reg()" class="mui-btn mui-btn-block mui-btn-primary">注册</button>
    </div>
</div>

<script type="text/javascript">
    function Reg()
    {
        var model = {};
        model.UserName = $("#UserName").val();
        model.UserPwd = $("#UserPwd").val();
        model.UserPwd_confirm = $("#UserPwd_confirm").val();
        if (model.UserPwd != model.UserPwd_confirm) {
            mui.toast('两次输入密码不一致！');
            return false;
        }
        model.Emaile = $("#Emaile").val();
        model.Mobile = $("#Mobile").val();
        DoPostAction(model, "/User/RegAction");
    }
</script>